<div class='form'>
<?php $this->beginWidget('bootstrap.widgets.TbModal', array('id' => 'login-modal')); ?>
    <div class="modal-header">
        <a class="close" data-dismiss="modal">&times;</a>
        <h3>Đăng nhập</h3>
    </div>

    <div class="modal-body">
    <?php
        $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
            'id' => 'LoginForm',
	        'enableClientValidation'=>true,
			'enableAjaxValidation'=>true,
            'htmlOptions' => array(
                'class' => ''),
        	'action'=>$this->createUrl('site/loginajax'),
            )
         );
?>

	<div class="flash-success">
		<?php echo Yii::app()->user->getFlash('success'); ?>
	</div>
  
    <?php echo $form->textFieldRow($model, 'username', array(
                            'class' => 'span3'
                            )
                      ); ?>
    <?php echo $form->passwordFieldRow($model, 'password', array(
                             'class' => 'span3'
                             )
                      ); ?>
     <br/><br/>                  
<?php $this->widget('bootstrap.widgets.TbButton', array(
                                             'buttonType' => 'ajaxSubmit', 
                                             'icon' => 'ok', 
                                             'label' => 'Submit', 
                                             'ajaxOptions' => array(
                                                'success' => 
'function(data){
       
    }'),
));
    ?>
     <?php $this->endWidget(); ?>
     </div>
<?php $this->endWidget(); ?>
</div>